home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / CTBUtilities.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  4.5 KB  |  177 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CTBUtilities.a
  3. ;
  4. ;    Contains:    Communications Toolbox Utilities interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1988-1993, 1995-1997 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__CTBUTILITIES__') = 'UNDEFINED' THEN
  19. __CTBUTILITIES__ SET 1
  20.  
  21.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  22.     include 'ConditionalMacros.a'
  23.     ENDIF
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  28.     include 'MixedMode.a'
  29.     ENDIF
  30.     IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
  31.     include 'Dialogs.a'
  32.     ENDIF
  33.     IF &TYPE('__APPLETALK__') = 'UNDEFINED' THEN
  34.     include 'AppleTalk.a'
  35.     ENDIF
  36.  
  37.  
  38. curCTBUVersion                    EQU        2                    ; version of Comm Toolbox Utilities
  39.  
  40.                                                             ;    Error codes/types    
  41. ctbuGenericError                EQU        -1
  42. ctbuNoErr                        EQU        0
  43. ; typedef OSErr                         CTBUErr
  44.  
  45.  
  46. chooseDisaster                    EQU        -2
  47. chooseFailed                    EQU        -1
  48. chooseAborted                    EQU        0
  49. chooseOKMinor                    EQU        1
  50. chooseOKMajor                    EQU        2
  51. chooseCancel                    EQU        3
  52. ; typedef unsigned short                 ChooseReturnCode
  53.  
  54.  
  55. nlOk                            EQU        0
  56. nlCancel                        EQU        1
  57. nlEject                            EQU        2
  58. ; typedef unsigned short                 NuLookupReturnCode
  59.  
  60.  
  61. nameInclude                        EQU        1
  62. nameDisable                        EQU        2
  63. nameReject                        EQU        3
  64. ; typedef unsigned short                 NameFilterReturnCode
  65.  
  66.  
  67. zoneInclude                        EQU        1
  68. zoneDisable                        EQU        2
  69. zoneReject                        EQU        3
  70. ; typedef unsigned short                 ZoneFilterReturnCode
  71.  
  72.  
  73.                                                             ;    Values for hookProc items        
  74. hookOK                            EQU        1
  75. hookCancel                        EQU        2
  76. hookOutline                        EQU        3
  77. hookTitle                        EQU        4
  78. hookItemList                    EQU        5
  79. hookZoneTitle                    EQU        6
  80. hookZoneList                    EQU        7
  81. hookLine                        EQU        8
  82. hookVersion                        EQU        9
  83. hookReserved1                    EQU        10
  84. hookReserved2                    EQU        11
  85. hookReserved3                    EQU        12
  86. hookReserved4                    EQU        13                    ;    "virtual" hookProc items    
  87. hookNull                        EQU        100
  88. hookItemRefresh                    EQU        101
  89. hookZoneRefresh                    EQU        102
  90. hookEject                        EQU        103
  91. hookPreflight                    EQU        104
  92. hookPostflight                    EQU        105
  93. hookKeyBase                        EQU        1000
  94.  
  95. ;     NuLookup structures/constants    
  96. NLTypeEntry                RECORD 0
  97. hIcon                     ds.l    1                ; offset: $0 (0)
  98. typeStr                     ds        Str32            ; offset: $4 (4)
  99.                          ORG 38
  100. sizeof                     EQU *                    ; size:   $26 (38)
  101.                         ENDR
  102. NLType                    RECORD 0
  103. elements                 ds.b    4 * NLTypeEntry.sizeof
  104. sizeof                     EQU *                    ; size:   $98 (152)
  105.                         ENDR
  106.  
  107.  
  108. NBPReply                RECORD 0
  109. theEntity                 ds        EntityName        ; offset: $0 (0)
  110. theAddr                     ds        AddrBlock        ; offset: $66 (102)
  111. sizeof                     EQU *                    ; size:   $6A (106)
  112.                         ENDR
  113. ;
  114. ; pascal CTBUErr InitCTBUtilities(void )
  115. ;
  116.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  117.         Macro
  118.         _InitCTBUtilities
  119.             move.w              #$0401,-(sp)
  120.             move.l              sp,A0
  121.             dc.w                $A08B
  122.             addq.w              #2,sp
  123.         EndM
  124.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  125.         IMPORT_CFM_FUNCTION InitCTBUtilities
  126.     ENDIF
  127.  
  128. ;
  129. ; pascal short CTBGetCTBVersion(void )
  130. ;
  131.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  132.         Macro
  133.         _CTBGetCTBVersion
  134.             move.w              #$0405,-(sp)
  135.             move.l              sp,A0
  136.             dc.w                $A08B
  137.             addq.w              #2,sp
  138.         EndM
  139.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  140.         IMPORT_CFM_FUNCTION CTBGetCTBVersion
  141.     ENDIF
  142.  
  143. ;
  144. ; pascal short StandardNBP(Point where, ConstStr255Param prompt, short numTypes, NLType typeList, NameFilterUPP nameFilter, ZoneFilterUPP zoneFilter, DialogHookUPP hook, NBPReply *theReply)
  145. ;
  146.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  147.         Macro
  148.         _StandardNBP
  149.             move.w              #$0406,-(sp)
  150.             move.l              sp,A0
  151.             dc.w                $A08B
  152.             addq.w              #2,sp
  153.         EndM
  154.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  155.         IMPORT_CFM_FUNCTION StandardNBP
  156.     ENDIF
  157.  
  158. ;
  159. ; pascal short CustomNBP(Point where, ConstStr255Param prompt, short numTypes, NLType typeList, NameFilterUPP nameFilter, ZoneFilterUPP zoneFilter, DialogHookUPP hook, long userData, short dialogID, ModalFilterUPP filter, NBPReply *theReply)
  160. ;
  161.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  162.         Macro
  163.         _CustomNBP
  164.             move.w              #$0407,-(sp)
  165.             move.l              sp,A0
  166.             dc.w                $A08B
  167.             addq.w              #2,sp
  168.         EndM
  169.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  170.         IMPORT_CFM_FUNCTION CustomNBP
  171.     ENDIF
  172.  
  173.     IF OLDROUTINENAMES THEN
  174.     ENDIF    ; OLDROUTINENAMES
  175.     ENDIF ; __CTBUTILITIES__ 
  176.  
  177.